using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._TerrainDataset._Conversion
{
    /// <summary>
    /// <para>Terrain To Raster</para>
    /// <para>Interpolates a raster using z-values from  a terrain dataset.</para>
    /// <para>使用 terrain 数据集中的 z 值对栅格进行插值。</para>
    /// </summary>    
    [DisplayName("Terrain To Raster")]
    public class TerrainToRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TerrainToRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_terrain">
        /// <para>Input Terrain</para>
        /// <para>The terrain dataset to process.</para>
        /// <para>要处理的 terrain 数据集。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster</para>
        /// <para><xdoc>
        ///   <para>The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file.</para>
        ///   <para>If the raster is stored as a TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格的位置和名称。将栅格数据集存储在地理数据库或 Esri Grid 等文件夹中时，请勿在栅格数据集的名称中添加文件扩展名。在将栅格存储在文件夹中时，可以提供文件扩展名来定义栅格的格式，例如.tif用于生成 GeoTIFF 或 .img 用于生成 ERDAS IMAGINE 格式文件。</para>
        ///   <para>如果栅格存储为 TIFF 文件或地理数据库中，则可以使用地理处理环境设置指定其栅格压缩类型和质量。</para>
        /// </xdoc></para>
        /// </param>
        public TerrainToRaster(object _in_terrain, object _out_raster)
        {
            this._in_terrain = _in_terrain;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Terrain To Raster";

        public override string CallName => "3d.TerrainToRaster";

        public override List<string> AcceptEnvironments => ["autoCommit", "compression", "configKeyword", "extent", "outputCoordinateSystem", "pyramid", "rasterStatistics", "snapRaster", "terrainMemoryUsage", "workspace"];

        public override object[] ParameterInfo => [_in_terrain, _out_raster, _data_type.GetGPValue(), _method.GetGPValue(), _sample_distance.GetGPValue(), _pyramid_level_resolution, _sample_value];

        /// <summary>
        /// <para>Input Terrain</para>
        /// <para>The terrain dataset to process.</para>
        /// <para>要处理的 terrain 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Terrain")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_terrain { get; set; }


        /// <summary>
        /// <para>Output Raster</para>
        /// <para><xdoc>
        ///   <para>The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file.</para>
        ///   <para>If the raster is stored as a TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格的位置和名称。将栅格数据集存储在地理数据库或 Esri Grid 等文件夹中时，请勿在栅格数据集的名称中添加文件扩展名。在将栅格存储在文件夹中时，可以提供文件扩展名来定义栅格的格式，例如.tif用于生成 GeoTIFF 或 .img 用于生成 ERDAS IMAGINE 格式文件。</para>
        ///   <para>如果栅格存储为 TIFF 文件或地理数据库中，则可以使用地理处理环境设置指定其栅格压缩类型和质量。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Output Data Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of numeric values stored in the output raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Floating Point—The output raster will use 32-bit floating point, which supports values ranging from -3.402823466e+38 to 3.402823466e+38. This is the default.</bullet_item><para/>
        ///     <bullet_item>Integer—The output raster will use an appropriate integer bit depth. This option will round z-values to the nearest whole number and write an integer to each raster cell value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定存储在输出栅格中的数值类型。</para>
        ///   <bulletList>
        ///     <bullet_item>浮点—输出栅格将使用 32 位浮点，该浮点支持范围为 -3.402823466e+38 至 3.402823466e+38 的值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>整数—输出栅格将使用适当的整数位深度。此选项会将 z 值舍入到最接近的整数，并为每个栅格像元值写入一个整数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Data Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._FLOAT;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Floating Point</para>
            /// <para>Floating Point—The output raster will use 32-bit floating point, which supports values ranging from -3.402823466e+38 to 3.402823466e+38. This is the default.</para>
            /// <para>浮点—输出栅格将使用 32 位浮点，该浮点支持范围为 -3.402823466e+38 至 3.402823466e+38 的值。这是默认设置。</para>
            /// </summary>
            [Description("Floating Point")]
            [GPEnumValue("FLOAT")]
            _FLOAT,

            /// <summary>
            /// <para>Integer</para>
            /// <para>Integer—The output raster will use an appropriate integer bit depth. This option will round z-values to the nearest whole number and write an integer to each raster cell value.</para>
            /// <para>整数—输出栅格将使用适当的整数位深度。此选项会将 z 值舍入到最接近的整数，并为每个栅格像元值写入一个整数。</para>
            /// </summary>
            [Description("Integer")]
            [GPEnumValue("INT")]
            _INT,

        }

        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>The interpolation method that will be used to calculate cell values.</para>
        ///   <bulletList>
        ///     <bullet_item>Linear—Applies a distance based weight to the Z of each node in the triangle encompassing the center of a given cell, then sums the weighted values to assign the cell value. This is the default.</bullet_item><para/>
        ///     <bullet_item>Natural Neighbors—Applies an area based weighting scheme that uses Voronoi polygons to determine cell values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于计算像元值的插值方法。</para>
        ///   <bulletList>
        ///     <bullet_item>线性 （Linear） - 将基于距离的权重应用于包含给定像元中心的三角形中每个节点的 Z，然后对加权值求和以分配像元值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>自然邻居 （Natural Neighbors） - 应用基于面积的加权方案，该方案使用 Voronoi 面来确定像元值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._LINEAR;

        public enum _method_value
        {
            /// <summary>
            /// <para>Linear</para>
            /// <para>Linear—Applies a distance based weight to the Z of each node in the triangle encompassing the center of a given cell, then sums the weighted values to assign the cell value. This is the default.</para>
            /// <para>线性 （Linear） - 将基于距离的权重应用于包含给定像元中心的三角形中每个节点的 Z，然后对加权值求和以分配像元值。这是默认设置。</para>
            /// </summary>
            [Description("Linear")]
            [GPEnumValue("LINEAR")]
            _LINEAR,

            /// <summary>
            /// <para>Natural Neighbors</para>
            /// <para>Natural Neighbors—Applies an area based weighting scheme that uses Voronoi polygons to determine cell values.</para>
            /// <para>自然邻居 （Natural Neighbors） - 应用基于面积的加权方案，该方案使用 Voronoi 面来确定像元值。</para>
            /// </summary>
            [Description("Natural Neighbors")]
            [GPEnumValue("NATURAL_NEIGHBORS")]
            _NATURAL_NEIGHBORS,

        }

        /// <summary>
        /// <para>Sampling Distance</para>
        /// <para><xdoc>
        ///   <para>The sampling method and distance used to define the cell size of the output raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Observations—Defines the number of cells that divide the longest side of the output raster. This method is used by default with the value of 250.</bullet_item><para/>
        ///     <bullet_item>Cell Size—Defines the cell size of the output raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义输出栅格像元大小的采样方法和距离。</para>
        ///   <bulletList>
        ///     <bullet_item>观测点 - 定义划分输出栅格最长边的像元数。默认情况下使用此方法，值为 250。</bullet_item><para/>
        ///     <bullet_item>像元大小 - 定义输出栅格的像元大小。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sample_distance_value _sample_distance { get; set; } = _sample_distance_value._OBSERVATIONS;

        public enum _sample_distance_value
        {
            /// <summary>
            /// <para>Observations</para>
            /// <para>Observations—Defines the number of cells that divide the longest side of the output raster. This method is used by default with the value of 250.</para>
            /// <para>观测点 - 定义划分输出栅格最长边的像元数。默认情况下使用此方法，值为 250。</para>
            /// </summary>
            [Description("Observations")]
            [GPEnumValue("OBSERVATIONS")]
            _OBSERVATIONS,

            /// <summary>
            /// <para>Cell Size</para>
            /// <para>Cell Size—Defines the cell size of the output raster.</para>
            /// <para>像元大小 - 定义输出栅格的像元大小。</para>
            /// </summary>
            [Description("Cell Size")]
            [GPEnumValue("CELLSIZE")]
            _CELLSIZE,

        }

        /// <summary>
        /// <para>Pyramid Level Resolution</para>
        /// <para>The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.</para>
        /// <para>将使用的地形金字塔级别的 z 容差或窗口大小分辨率。默认值为 0，即全分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Level Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _pyramid_level_resolution { get; set; } = 0;


        /// <summary>
        /// <para>Sampling Value</para>
        /// <para>The value that corresponds with the Sampling Distance for specifying the output raster's cell size.</para>
        /// <para>与用于指定输出栅格像元大小的采样距离相对应的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _sample_value { get; set; } = 250;


        public TerrainToRaster SetEnv(int? autoCommit = null, object compression = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object pyramid = null, object rasterStatistics = null, object snapRaster = null, object terrainMemoryUsage = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, compression: compression, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, pyramid: pyramid, rasterStatistics: rasterStatistics, snapRaster: snapRaster, terrainMemoryUsage: terrainMemoryUsage, workspace: workspace);
            return this;
        }

    }

}